☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

base_path

Table of contents

Description:

This key defines a path for files created using an option in the + Add button dropdown.

This path overrides the path for the current Collection and subfolder open in the Collection browser.

This key is useful if you need to specify a specific subfolder within a Collection.

Appears in:
└── collections_config
    └── *
        └── add_options
            └── [*]
                └── Add Option
                    └── base_path
Type:
string
Examples:

In this example, we want team members in the _posts Collection to create new files in theblog subfolder of the _drafts Collection rather than the current Collection browser they have open. By configuring the base_path value to /../_drafts/blog, new files will be created in a different Collection subfolder (i.e., _drafts) when a team member selects this option from the + Add button dropdown.

Copied to clipboard
collections_config:
  _posts:
    add_options:
      - name: Add draft blog
        icon: post_add
        editor: content
        base_path: /../_drafts/blog
{
  "collections_config": {
    "_posts": {
      "add_options": [
        {
          "name": "Add draft blog",
          "icon": "post_add",
          "editor": "content",
          "base_path": "/../_drafts/blog"
        }
      ]
    }
  }
}
Open in a new tab